package com.wx.service;

import com.github.pagehelper.PageInfo;
import com.wx.common.PageParam;
import com.wx.domain.dto.DayReportQueryParam;
import com.wx.domain.dto.StatisticsDto;
import com.wx.domain.dto.SysPatientDto;
import com.wx.domain.vo.*;
import com.wx.entity.SysPatient;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>Title:      SysPatientService. </p>
 * <p>Description  </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:    医百科技有限公司 </p>
 *
 * @author         yangwensheng@100doc.com.cn
 * @since      2021-03-03 11:36:07
 */
public interface SysPatientService extends BaseService<SysPatient> {

    List<PatientVo> listPage(SysPatientDto sysPatient);

    String onlineApplication(SysPatient sysPatient);

    int updateStatus(SysPatient sysPatient);

    int updateAgreement(String id, String openid, String nickName) throws Exception;

    String nurseInput(SysPatient sysPatient);

    PageInfo<SysPatient> listPageByOpenId(PageParam<SysPatient> param, String openId, Integer status);

    SysPatient getPatientInfoByOpenId(String openId);

    SysPatient checkValidateCode(String openId, String mobile, String validateCode);

    List<SysPatient> selectByHospitalIds(List<String> hospitalIds);

    NurseVo queryNurseByPatientOfOpenId(String openId);

    SysPatient getPatientInfoById(String patientId);

    List<EchartsVo> apiIndexStatistics(String openId, Integer type);

    List<BigDecimal> prescriptionsNum(String openid, StatisticsDto statisticsDto);

    List<BigDecimal> prescriptionsPercentage(String openid, StatisticsDto statisticsDto);

    ChangeReasonVo changeReason(String openid);

    List<EchartsVo> sysIndexStatistics(Integer type);

    List<BigDecimal> sysPrescriptionsNum(StatisticsDto statisticsDto);

    List<BigDecimal> sysPrescriptionsPercentage(StatisticsDto statisticsDto);

    ChangeReasonVo sysChangeReason();

    void checkPatient(SysPatient sysPatient) throws Exception;

    List<PrescriptionStatisticsVo> exportPrescriptionStatistics(DayReportQueryParam dayReportQueryParam);

    List<NewJoinGroupStatistics> exportNewJoinGroup(DayReportQueryParam dayReportQeuryParam);

    List<FollowStatistics> selectAllNurse();

    void batchUpdateNurseId(List<String> patientIds, String nurseId);

    int deletePatient(String id);

    List<SysPatient> selectByIds(List<String> patientIds);
}
